var http = require('http')
var url=require('url')
var fs=require('fs')
http.createServer(function (req, res){

    get('/check',req,res,function (request,response) {
         response.end('check')
    })

    get('/login',req, res,function (request,response) {
       response.end('login');
    })
}).listen(3000);


function get(path,request,response,callback){
    var urlObj = url.parse(request.url,true);
    if (urlObj.pathname == path) {
       callback(request,response)
    }
}


console.log('the server is running at port 3000');
